package com.myapplication.http.util;

import org.xutils.ex.HttpException;

/**
 * Created by zskzh on 2016/7/2.
 */
public class HttpFail {
    public static String onError(Throwable ex, boolean isOnCallback){
        if(ex instanceof HttpException){
            int code = ((HttpException) ex).getCode();
            String errorResult = ((HttpException) ex).getResult();
            return errorResult;
        }
        return null;
    }
}
